struct ListNode* deleteDuplicates(struct ListNode* head) {
    if(head==NULL||head->next==NULL)
    {
        return head;
    }
    struct ListNode* p=head;
    if(p->val!=p->next->val)//判断结点值与后续结点值是否相等
    {
        p->next=deleteDuplicates(p->next);//递归
        return p;
    }
    while(p && p->next)//循环
    {
        if(p->val==p->next->val)
        {
            p=p->next;
        }
        else
        {
            break;
        }
    }
    return deleteDuplicates(p->next);
}